#!/bin/sh
set -eu

# Import updated source content from git to Zanata (possibly run nightly)

# update pot files before importing to zanata
echo "Updating POT files"
publican update_pot

# push updated pot files to zanata for translation
echo "Pushing updated POT files to Zanata for translation"
mvn zanata:publican-push -e -B

# optional: push pot files back to VCS (probably best avoided for nightly jobs)
echo "Finished!  You may want to check pot into version control to track the updated POT files"
